home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / GNU / emacs.inst / emacs19.idb / usr / share / src / gnu / INSTALL.emacs19.z / INSTALL.emacs19
Encoding:
Text File  |  1994-08-02  |  21.7 KB  |  498 lines

  1. GNU Emacs Installation Guide
  2. Copyright (c) 1992 Free software Foundation, Inc.
  3.  
  4.    Permission is granted to anyone to make or distribute verbatim copies
  5.    of this document as received, in any medium, provided that the
  6.    copyright notice and permission notice are preserved,
  7.    and that the distributor grants the recipient permission
  8.    for further redistribution as permitted by this notice.
  9.  
  10.    Permission is granted to distribute modified versions
  11.    of this document, or of portions of it,
  12.    under the above conditions, provided also that they
  13.    carry prominent notices stating who last changed them,
  14.    and that any new or changed statements about the activities
  15.    of the Free Software Foundation are approved by the Foundation.
  16.  
  17.  
  18. BUILDING AND INSTALLATION:
  19.  
  20. 1) Make sure your system has enough swapping space allocated to handle
  21. a program whose pure code is 900k bytes and whose data area is at
  22. least 400k and can reach 8Mb or more.  If the swapping space is
  23. insufficient, you will get an error in the command `temacs -batch -l
  24. loadup dump', found in `./src/Makefile.in.in', or possibly when
  25. running the final dumped Emacs.
  26.  
  27. Building Emacs requires about 30 Mb of disk space (including the Emacs
  28. sources).  Once installed, Emacs occupies about 20 Mb in the file
  29. system where it is installed; this includes the executable files, Lisp
  30. libraries, miscellaneous data files, and on-line documentation.  If
  31. the building and installation take place in different directories,
  32. then the installation procedure momentarily requires 30+20 Mb.
  33.  
  34. 2) Consult `./etc/MACHINES' to see what configuration name you should
  35. give to the `configure' program.  That file sometimes offers hints for
  36. getting around some possible installation problems.
  37.  
  38. 3) In the top directory of the Emacs distribution, run the program
  39. `configure' as follows:
  40.  
  41.     ./configure CONFIGURATION-NAME [--OPTION[=VALUE]] ...
  42.  
  43. The CONFIGURATION-NAME argument should be a configuration name given
  44. in `./etc/MACHINES'.  If omitted, `configure' will try to guess your
  45. system type by inspecting its environment; if it cannot, you must find
  46. the appropriate configuration name in `./etc/MACHINES' and specify it
  47. explicitly.
  48.  
  49. The `--with-x', `--with-x11', and `--with-x10' options specify which
  50. window system Emacs should support.  If you don't want X support,
  51. specify `--with-x=no'.  If all of these options are omitted,
  52. `configure' will try to figure out for itself whether your system has
  53. X11, and arrange to use it if present.
  54.  
  55. The `--x-includes=DIR' and `--x-libraries=DIR' options tell the build
  56. process where the compiler should look for the include files and
  57. object libraries used with the X Window System.  Normally, your
  58. compiler should be able to find these by default; these options should
  59. only be necessary if you have your X Window System files installed in
  60. unusual places.
  61.  
  62. The `--run-in-place' option sets up default values for the path
  63. variables in `./Makefile' so that Emacs will expect to find its data
  64. files (lisp libraries, runnable programs, and the like) in the same
  65. locations they occupy while Emacs builds.  This means that you don't
  66. have to install Emacs in order to run it; it uses its data files as
  67. they were unpacked.
  68.  
  69. The `--with-gcc' option specifies that the build process should
  70. compile Emacs using GCC.  If you don't want to use GCC, specify
  71. `--with-gcc=no'.  If this option is omitted, `configure' will search
  72. for GCC in your load path, and use it if present.
  73.  
  74. The `--srcdir=DIR' option specifies that the configuration and build
  75. processes should look for the Emacs source code in DIR, when DIR is
  76. not the current directory.
  77.  
  78. You can use `--srcdir' to build Emacs for several different machine
  79. types from a single source directory.  Make separate build directories
  80. for the different configuration types, and in each one, build Emacs
  81. specifying the common source directory with `--srcdir'.
  82.  
  83. The `--prefix=PREFIXDIR' option specifies where the installation process
  84. should put emacs and its data files.  This defaults to `/usr/local'.
  85. - Emacs (and the other utilities users run) go in PREFIXDIR/bin
  86.   (unless the `--exec-prefix' option says otherwise).
  87. - The architecture-independent files go in PREFIXDIR/lib/emacs/VERSION
  88.   (where VERSION is the version number of Emacs, like `19.7').
  89. - The architecture-dependent files go in
  90.   PREFIXDIR/lib/emacs/VERSION/CONFIGURATION
  91.   (where CONFIGURATION is the configuration name, like mips-dec-ultrix4.2),
  92.   unless the `--exec-prefix' option says otherwise.
  93.  
  94. The `--exec-prefix=EXECDIR' option allows you to specify a separate
  95. portion of the directory tree for installing architecture-specific
  96. files, like executables and utility programs.  If specified,
  97. - Emacs (and the other utilities users run) go in EXECDIR/bin, and
  98. - The architecture-dependent files go in
  99.   EXECDIR/lib/emacs/VERSION/CONFIGURATION.
  100. EXECDIR/bin should be a directory that is normally in users' PATHs.
  101.  
  102. For example, the command
  103.  
  104.     ./configure mips-dec-ultrix --with-x11
  105.  
  106. configures Emacs to build for a DECstation running Ultrix, with
  107. support for the X11 window system.
  108.  
  109. The `configure' program does not accept abbreviations for its
  110. options.
  111.  
  112. Note that `configure' doesn't do any compilation or installation
  113. itself.  It just creates the files that influence those things:
  114. `./Makefile', `build-install', and `./src/config.h'.  For details on
  115. exactly what it does, see the section called `CONFIGURATION BY HAND',
  116. below.
  117.  
  118. When it is done, `configure' prints a description of what it did and
  119. leaves a copy in the file `config.status'.  That file is also a shell
  120. script which, when run, recreates the same configuration; it contains
  121. the verbal description as a comment.  If `configure' exits with an
  122. error after disturbing the status quo, it removes `config.status'.
  123.  
  124. The work of `configure' can be done by editing various files in the
  125. distribution, but using `configure' is supposed to be simpler.  See
  126. the section called "CONFIGURATION BY HAND" below if you want to do the
  127. configuration yourself.
  128.  
  129. 4) Look at `./lisp/paths.el'; if some of those values are not right
  130. for your system, edit the file `./lisp/site-init.el' containing Emacs
  131. Lisp code to override them; you probably don't want to edit paths.el
  132. itself.  YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES,
  133. rather than `defvar', as used by `./lisp/paths.el'.  For example,
  134.  
  135.      (setq news-inews-program "/usr/bin/inews")
  136.  
  137. is how you would override the default value of the variable
  138. news-inews-program (which is "/usr/local/inews").
  139.  
  140. Note that, on some systems, the code you place in site-init.el must
  141. not use expand-file-name or any other function which may look
  142. something up in the system's password and user information database.
  143. See `./PROBLEMS' for more details on which systems this affects.
  144.  
  145. 5) Put into `./lisp/site-init.el' any Emacs Lisp code you want Emacs
  146. to load before it is dumped out.  
  147.  
  148. Note that, on some systems, the code you place in site-init.el must
  149. not use expand-file-name or any other function which may look
  150. something up in the system's password and user information database.
  151. See `./PROBLEMS' for more details on which systems this affects.
  152.  
  153. This file is nonexistent in the distribution.  You do not need to
  154. create it if you have nothing to put in it.
  155.  
  156. 6) Refer to the file `./etc/TERMS' for information on fields you may
  157. wish to add to various termcap entries.  The files `./etc/termcap.ucb'
  158. and `./etc/termcap.dat' may already contain appropriately-modified
  159. entries.
  160.  
  161. 7) Run `make' in the top directory of the Emacs distribution to finish
  162. building Emacs in the standard way.  The final executable file will be
  163. named `src/emacs'.  If you want to have Emacs's executable programs
  164. and data files installed as well, run `make install'.
  165.  
  166. By default, Emacs installs its files in the following directories:
  167.  
  168. `/usr/local/bin' holds the executable programs users normally run -
  169.         `emacs', `etags', `ctags', `b2m', and `emacsclient'.
  170.  
  171. `/usr/local/lib/emacs/VERSION/lisp' holds the Emacs Lisp library;
  172.         `VERSION' stands for the number of the Emacs version
  173.         you are installing, like `18.59' or `19.0'.  Since the
  174.         lisp library changes from one version of Emacs to
  175.         another, including the version number in the path
  176.         allows you to have several versions of Emacs installed
  177.         at the same time; this means that you don't have to
  178.         make Emacs unavailable while installing a new
  179.         version.
  180.  
  181.         Emacs searches for its lisp files in
  182.         `/usr/local/lib/emacs/site-lisp', then in this
  183.         directory.
  184.  
  185. `/usr/local/lib/emacs/VERSION/etc' holds the Emacs tutorial, the DOC
  186.         file, the `yow' database, and other
  187.         architecture-independent files Emacs might need while
  188.         running.  VERSION is as specified for `.../lisp'.
  189.  
  190. `/usr/local/lib/emacs/lock' contains files indicating who is editing
  191.         what, so Emacs can detect editing clashes between
  192.         users.
  193.  
  194. `/usr/local/lib/emacs/VERSION/CONFIGURATION-NAME' contains executable
  195.         programs used by Emacs that users are not expected to
  196.         run themselves.
  197.         `VERSION' is the number of the Emacs version you are
  198.         installing, and `CONFIGURATION-NAME' is the argument
  199.         you gave to the `configure' program to identify the
  200.         architecture and operating system of your machine,
  201.         like `mips-dec-ultrix' or `sparc-sun-sunos'.  Since
  202.         these files are specific to the version of Emacs,
  203.         operating system, and architecture in use, including
  204.         the configuration name in the path allows you to have
  205.         several versions of Emacs for any mix of machines and
  206.         operating systems installed at the same time; this is
  207.         useful for sites at which different kinds of machines
  208.         share the file system Emacs is installed on.
  209.  
  210. `/usr/local/info' holds the on-line documentation for Emacs, known as
  211.         "info files".  Many other GNU programs are documented
  212.         using info files as well, so this directory stands
  213.         apart from the other, Emacs-specific directories.
  214.  
  215. `/usr/local/man/man1' holds the man pages for the programs installed
  216.         in `/usr/local/bin'.
  217.  
  218. If these directories are not what you want, you can specify where to
  219. install Emacs's libraries and data files or where Emacs should search
  220. for its lisp files by giving values for `make' variables as part of
  221. the command.  See the section below called `MAKE VARIABLES' for more
  222. information on this.
  223.  
  224. 8) Check the file `dir' in your site's info directory (usually
  225. /usr/local/info) to make sure that it has a menu entry for the Emacs
  226. info files.
  227.  
  228. 9) If your system uses lock files to interlock access to mailer inbox files,
  229. then you might need to make the program arch-lib/movemail setuid or setgid
  230. to enable it to write the lock files.  We believe this is safe.
  231.  
  232. 10) You are done!
  233.  
  234.  
  235. MAKE VARIABLES
  236.  
  237. You can change where the build process installs Emacs and its data
  238. files by specifying values for `make' variables as part of the `make'
  239. command line.  For example, if you type
  240.  
  241.     make install bindir=/usr/local/gnubin
  242.  
  243. the `bindir=/usr/local/gnubin' argument indicates that the Emacs
  244. executable files should go in `/usr/local/gnubin', not
  245. `/usr/local/bin'.
  246.  
  247. Here is a complete list of the variables you may want to set.
  248.  
  249. `bindir' indicates where to put executable programs that users can
  250.     run.  This defaults to /usr/local/bin.
  251.  
  252. `datadir' indicates where to put the architecture-independent
  253.     read-only data files that Emacs refers to while it runs; it
  254.     defaults to /usr/local/lib.  We create the following
  255.     subdirectories under `datadir':
  256.     - `emacs/VERSION/lisp', containing the Emacs lisp library, and
  257.     - `emacs/VERSION/etc', containing the Emacs tutorial, the DOC
  258.         file, and the `yow' database.
  259.     `VERSION' is the number of the Emacs version you are installing,
  260.     like `18.59' or `19.0'.  Since these files vary from one version
  261.     of Emacs to another, including the version number in the path
  262.     allows you to have several versions of Emacs installed at the
  263.     same time; this means that you don't have to make Emacs
  264.     unavailable while installing a new version.
  265.  
  266. `statedir' indicates where to put architecture-independent data files
  267.     that Emacs modifies while it runs; it defaults to
  268.     /usr/local/lib as well.  We create the following
  269.     subdirectories under `statedir':
  270.     - `emacs/lock', containing files indicating who is editing
  271.         what, so Emacs can detect editing clashes between
  272.         users.
  273.  
  274. `libdir' indicates where to put architecture-specific data files that
  275.     Emacs refers to as it runs; it too defaults to `/usr/local/lib'.
  276.     We create the following subdirectories under `libdir':
  277.     - `emacs/VERSION/CONFIGURATION-NAME', containing executable
  278.         programs used by Emacs that users are not expected to run
  279.         themselves.  
  280.     `VERSION' is the number of the Emacs version you are installing,
  281.     and `CONFIGURATION-NAME' is the argument you gave to the
  282.     `configure' program to identify the architecture and operating
  283.     system of your machine, like `mips-dec-ultrix' or
  284.     `sparc-sun-sunos'.  Since these files are specific to the version
  285.     of Emacs, operating system, and architecture in use, including
  286.     the configuration name in the path allows you to have several
  287.     versions of Emacs for any mix of machines and operating systems
  288.     installed at the same time; this is useful for sites at which
  289.     different kinds of machines share the file system Emacs is
  290.     installed on.
  291.  
  292. `infodir' indicates where to put the info files distributed with
  293.     Emacs; it defaults to `/usr/local/info'.
  294.  
  295. `mandir' indicates where to put the man pages for Emacs and its
  296.     utilities (like `etags'); it defaults to
  297.     `/usr/local/man/man1'.
  298.  
  299. `manext' gives the extension the man pages should be installed with.
  300.     It should contain a period, followed by the appropriate
  301.     digit.  It defaults to `.1'.  For example given the default
  302.     values for `mandir' and `manext', the Emacs man page would be
  303.     installed as `/usr/local/man/man1/emacs.1'.
  304.  
  305. `prefix' doesn't give a path for any specific part of Emacs; instead,
  306.     its value is used to determine the defaults for all the
  307.     architecture-independent path variables - `datadir',
  308.     `statedir', `infodir', and `mandir'.  Its default value is
  309.     `/usr/local'; the other variables add on `lib' or `man' to it
  310.     by default.
  311.  
  312.     For example, suppose your site generally places GNU software
  313.     under `/usr/users/software/gnusoft' instead of `/usr/local'.
  314.     By including
  315.         `prefix=/usr/users/software/gnusoft'
  316.     in the arguments to `make', you can instruct the build process
  317.     to place all of the Emacs data files in the appropriate
  318.     directories under that path.
  319.  
  320. `exec_prefix' serves the same purpose as `prefix', but instead
  321.     determines the default values for the architecture-dependent
  322.     path variables - `bindir' and `libdir'.
  323.  
  324. The above variables serve analogous purposes in the makefiles for all
  325. GNU software; here are some variables specific to Emacs.
  326.  
  327. `lispdir' indicates where Emacs installs and expects its lisp
  328.     library.  Its default value, based on `datadir' (which see),
  329.     is `/usr/local/lib/emacs/VERSION/lisp' (where `VERSION' is as
  330.     described above).
  331.  
  332. `locallisppath' indicates where Emacs should search for lisp files
  333.     specific to your site.  It should be a colon-separated list of
  334.     directories; Emacs checks them in order before checking
  335.     `lispdir'.
  336.  
  337. `lisppath' is the complete list of directories Emacs should search for
  338.     its lisp files; its default value is the concatenation of
  339.     `lispdir' and `locallisppath'.  It should be a colon-separated
  340.     list of directories; Emacs checks them in the order they
  341.     appear.
  342.  
  343. `etcdir' indicates where Emacs should install and expect the rest of
  344.     its architecture-independent data, like the tutorial, DOC
  345.     file, and yow database.  Its default value, based on `datadir'
  346.     (which see), is `/usr/local/lib/emacs/VERSION/etc'.
  347.  
  348. `lockdir' indicates the directory where Emacs keeps track of its
  349.     locking information.  Its default value, based on `statedir'
  350.     (which see), is `/usr/local/lib/emacs/lock'.
  351.  
  352. `archlibdir' indicates where Emacs installs and expects the
  353.     executable files and other architecture-dependent data it uses
  354.     while running.  Its default value, based on `libdir' (which
  355.     see), is `/usr/local/lib/emacs/VERSION/CONFIGURATION-NAME'
  356.     (where VERSION and CONFIGURATION-NAME are as described above).
  357.  
  358. Remember that you must specify any variable values you need each time
  359. you run `make' in the top directory.  If you run `make' once to build
  360. emacs, test it, and then run `make' again to install the files, you
  361. must provide the same variable settings each time.  To make the
  362. settings persist, you can edit them into the `Makefile' in the top
  363. directory, but be aware that running the `configure' program erases
  364. `Makefile' and rebuilds it from `Makefile.in'.
  365.  
  366. The top-level Makefile stores the variable settings it used in the
  367. Makefiles for the subdirectories, so you don't have to specify them
  368. when running make in the subdirectories.
  369.  
  370.  
  371. CONFIGURATION BY HAND
  372.  
  373. Running the `configure' program performs the following steps.
  374.  
  375. 1) Copy `./src/config.h.in' to `./src/config.h'.
  376.  
  377. 2) Consult `./etc/MACHINES' to see what configuration name you should
  378. use for your system.  Look at the code of the `configure' script to
  379. see which operating system and architecture description files from
  380. `src/s' and `src/m' should be used for that configuration name.  Edit
  381. `src/config.h', and change the two `#include' directives to include
  382. the appropriate system and architecture description files.
  383.  
  384. 2) Edit `./src/config.h' to set the right options for your system.  If
  385. you need to override any of the definitions in the s/*.h and m/*.h
  386. files for your system and machine, do so by editing config.h, not by
  387. changing the s/*.h and m/*.h files.  Occasionally you may need to
  388. redefine parameters used in `./lib-src/movemail.c'.
  389.  
  390. 3) If you're going to use the make utility to build Emacs, you will
  391. still need to run `configure' first, giving theappropriate values for
  392. the variables in the sections entitled "Things `configure' Might Edit"
  393. and "Where To Install Things."  Note that you may only need to change
  394. the variables `prefix' and `exec_prefix', since the rest of the
  395. variables have reasonable defaults based on them.  For each Makefile
  396. variable of this type, there is a corresponding configure option; for
  397. example, to change the location of the lock directory, you might use
  398.  
  399.      ./configure --lockdir=/nfs/emacslock
  400.  
  401. 4) If you're going to use the build-install script to build Emacs,
  402. copy `./build-ins.in' to `./build-install', and edit the
  403. definitions found at the top of the script.
  404.  
  405. The `configure' script is built from `configure.in' by the `autoconf'
  406. program.  However, since Emacs has configuration requirements that
  407. autoconf can't meet, `configure.in' uses an marriage of custom-baked
  408. configuration code and autoconf macros.  New versions of autoconf
  409. could very well break this arrangement, so it may be wise to avoid
  410. rebuilding `configure' from `configure.in' when possible.
  411.  
  412.  
  413. BUILDING GNU EMACS BY HAND
  414.  
  415. Once Emacs is configured, running `make' or running the shell script
  416. `build-install' in the top directory performs the following steps.
  417.  
  418. 1) Run `make src/paths.h' in the top directory.  This produces
  419. `./src/paths.h' from the template file `./src/paths.h.in', changing
  420. the paths to the values specified in `./Makefile'.
  421.  
  422. 2) Cd to `./lib-src' and run `make'.  This creates executables named
  423. `ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc'
  424. and `test-distrib'.  And others.
  425.  
  426. 3) Cd to `./src' and Run `make'.  This refers to files in the `./lisp'
  427. and `./lib-src' subdirectories using names `../lisp' and
  428. `../lib-src'.
  429.  
  430. This creates a file `./src/emacs' which is the runnable Emacs,
  431. assigning it a new build version number by incrementing the build
  432. version stored in `./lisp/version.el'.
  433.  
  434. It also creates a file in `./etc' whose name is `DOC' followed by the
  435. current Emacs version.  This file contains documentation strings for
  436. all the functions in Emacs.  Each time you run make to make a new
  437. emacs, a new DOC file with a new name is made.  You must keep the DOC
  438. file for an Emacs version as long as you keep using that Emacs
  439. version.
  440.  
  441.  
  442. INSTALLATION BY HAND
  443.  
  444. The steps below are done by the shell script `build-install' or by
  445. running `make install' in the main directory of the Emacs
  446. distribution.
  447.  
  448. 1) Copy `./lisp' and its subdirectories, `./etc', and the executables
  449. in `./lib-src' to their final destinations, as selected in `./src/paths.h'.
  450.  
  451. Strictly speaking, not all of the executables in `./lib-src' need be copied.
  452. - The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl',
  453.     `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by
  454.     Emacs; they do need to be copied.
  455. - The programs `etags', `ctags', `emacsclient', `b2m', and `rcs2log'
  456.     are intended to be run by users; they are handled below.
  457. - The programs `make-docfile', `make-path', and `test-distrib' were
  458.     used in building Emacs, and are not needed any more.
  459. - The programs `digest-doc' and `sorted-doc' convert a `DOC' file into
  460.     a file for users to read.  There is no important reason to move them.
  461.  
  462. 2) Copy the files in `./info' to the place specified in
  463. `./lisp/site-init.el' or `./lisp/paths.el'.  Note that if the
  464. destination directory already contains a file named `dir', you
  465. probably don't want to replace it with the `dir' file in the Emacs
  466. distribution.  Instead, you should make sure that the existing `dir'
  467. file contains an appropriate menu entry for the Emacs info.
  468.  
  469. 3) Create a directory for Emacs to use for clash detection, named as
  470. indicated by the PATH_LOCK macro in `./src/paths.h'.
  471.  
  472. 4) Copy `./src/emacs' to `/usr/local/bin', or to some other directory
  473. in users' search paths.  `./src/emacs' has an alternate name
  474. `./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
  475. `/usr/local/bin/emacs' pointing to that alternate name, as an easy way
  476. of installing different versions.
  477.  
  478. You can delete `./src/temacs'.
  479.  
  480. 5) Copy the programs `b2m', `emacsclient', `ctags', `etags', and
  481. `rcs2log' from `./lib-src' to `/usr/local/bin'.  These programs are
  482. intended for users to run.
  483.  
  484. 6) Copy the man pages in `./etc' for emacs, ctags, and etags into the
  485. appropriate man directories.
  486.  
  487. 7) The files in the `./src' subdirectory, except for `emacs', are not
  488. used by Emacs once it is built.  The source would be handy for
  489. debugging.
  490.  
  491.  
  492. PROBLEMS
  493.  
  494. See the file PROBLEMS in this directory for a list of various
  495. problems sometimes encountered, and what to do about them.
  496.  
  497.  
  498.